<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="dao.DaoBlog" %>
<%@ page import="polo.Blog" %>
<%@ page import="java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>博文信息</title>
</head>
<body>
<%
response.setContentType("text/html;charset=gbk");

String name=(String) session.getAttribute("name");
Blog blog=new DaoBlog().getBlogInfo(name);



//输出显示博客的动态页面
out.println("<html>");
out.println("<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><title>博文信息</title>");
out.println("</head>");
out.println("<body><table border=\"1\">");
out.println("<caption>"+name+"</caption>");


//遍历输出blog属性blogMap中元素
Map<String,String> blogMap=blog.getBlogMap();
for(Object o:blogMap.keySet()){
	out.println("<tr><td><a href=\"blog.jsp\">"+(String)o+"</td><td>"+blogMap.get((String)o)+"</a></td><br/></tr>");
}
out.println("</table>");
out.println("<a href=\""+request.getContextPath()+"/editblog.html\">发表新博文</a>");
out.println("</body>");
out.println("</html>");
out.flush();


%>
</body>
</html>